<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Collision Checker: cpp/collision/src/narrowphase/sphere.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li><li class="navelem"><a class="el" href="dir_0bc2acc18702bc40f3a0aa3bc19285f7.html">src</a></li><li class="navelem"><a class="el" href="dir_e6a098a69b4576d04ca32995358016e2.html">narrowphase</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">sphere.cc</div>  </div>
</div><!--header-->
<div class="contents">
<a href="sphere_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fcl__decl_8h.html">collision/solvers/fcl/fcl_decl.h</a>&quot;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fcl__transform_8h.html">collision/solvers/fcl/fcl_transform.h</a>&quot;</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;fcl/narrowphase/collision.h&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;fcl/narrowphase/collision_object.h&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="point_8h.html">collision/narrowphase/point.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="raytrace__primitive_8h.html">collision/raytrace_primitive.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;fcl/math/constants.h&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="sphere_8h.html">collision/narrowphase/sphere.h</a>&quot;</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<a class="code" href="classfcl_1_1_collision_geometry.html">fcl::CollisionGeometry&lt;FCL_PRECISION&gt;</a> *</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#ab2917f7a9433d4718cb04b9ae87e8b43">   18</a></span>&#160;<a class="code" href="classcollision_1_1_sphere.html#ab2917f7a9433d4718cb04b9ae87e8b43">Sphere::createFCLCollisionGeometry</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> fcl::Sphere&lt;FCL_PRECISION&gt;(this-&gt;<a class="code" href="classcollision_1_1_sphere.html#ac773bc522d6d9dacf188ce25330efa31">radius</a>());</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;}</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#a754374f00e6100ea2cfbbd2ee004ff2b">   23</a></span>&#160;<a class="code" href="classfcl_1_1_collision_object.html">fcl::CollisionObject&lt;FCL_PRECISION&gt;</a> *<a class="code" href="classcollision_1_1_sphere.html#a754374f00e6100ea2cfbbd2ee004ff2b">Sphere::createFCLCollisionObject</a>(</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keyword">const</span> std::shared_ptr&lt;<a class="code" href="classfcl_1_1_collision_geometry.html">fcl::CollisionGeometry&lt;FCL_PRECISION&gt;</a>&gt; &amp;col_geom)<span class="keyword"></span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">    const </span>{</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classfcl_1_1_collision_object.html">fcl::CollisionObject&lt;FCL_PRECISION&gt;</a>(</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;      col_geom,</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;      <a class="code" href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_transform.html#a9eb07527b07f8c286ed869c9a186b518">collision::FCLTransform::fcl_get_3d_translation</a>(this-&gt;<a class="code" href="classcollision_1_1_shape.html#aca9a2f6e0de0822e241e39dad9c419ce">center</a>()));</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;}</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#a917e3ac548dff5f5ffd873845b9e7567">   32</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_sphere.html#a917e3ac548dff5f5ffd873845b9e7567">Sphere::rayTrace</a>(<span class="keyword">const</span> Eigen::Vector2d &amp;point1,</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;                      <span class="keyword">const</span> Eigen::Vector2d &amp;point2,</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;                      std::vector&lt;LineSegment&gt; &amp;intersect)<span class="keyword"> const </span>{</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;  <span class="comment">// LineSegment obj_segment(point1, point2);</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  std::vector&lt;Eigen::Vector2d&gt; inters1;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keywordtype">int</span> res = 0;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;  res = <a class="code" href="namespacecollision_1_1raytrace.html#ad60325650aba6f3ce8fd4eb92cad44c1">raytrace::findLineCircleIntersections</a>(this-&gt;<a class="code" href="classcollision_1_1_shape.html#a690571543f14979499df6fbada671f1f">center_x</a>(),</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;                                              this-&gt;<a class="code" href="classcollision_1_1_shape.html#aabac3270d60bb5affed693af36fd39d8">center_y</a>(), this-&gt;<a class="code" href="classcollision_1_1_sphere.html#ac773bc522d6d9dacf188ce25330efa31">radius</a>(),</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;                                              point1, point2, inters1);</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  <span class="keywordflow">if</span> (res == 2) {</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    <a class="code" href="structcollision_1_1raytrace_1_1_point.html">raytrace::Point</a> p1(point1);</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <a class="code" href="structcollision_1_1raytrace_1_1_point.html">raytrace::Point</a> p2(point2);</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <a class="code" href="structcollision_1_1raytrace_1_1_point.html">raytrace::Point</a> p_int1(inters1[0]);</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <a class="code" href="structcollision_1_1raytrace_1_1_point.html">raytrace::Point</a> p_int2(inters1[1]);</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">bool</span> o1 = <a class="code" href="namespacecollision_1_1raytrace.html#a025bf0f171abcc1cf7bbee6c4a41bba3">raytrace::onSegment</a>(p1, p_int1, p2);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordtype">bool</span> o2 = <a class="code" href="namespacecollision_1_1raytrace.html#a025bf0f171abcc1cf7bbee6c4a41bba3">raytrace::onSegment</a>(p1, p_int2, p2);</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordflow">if</span> (o1 &amp;&amp; o2) {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;      intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[0], inters1[1]));</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;      <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classcollision_1_1_collision_object_ex.html#a7fa9738682fe6d4cdef843e99fa5e693">collide</a>(<a class="code" href="classcollision_1_1_point.html">collision::Point</a>(point1),</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;                        <a class="code" href="classcollision_1_1_collision_request.html">CollisionRequest</a>(<a class="code" href="namespacecollision.html#a5710326b44abbfb109e65257ee5f310aa8ebb6af9dcffddc56e2de7bad9a3508b">COL_DEFAULT</a>))) {</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">if</span> (o1) {</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;          intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[0], point1));</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (o2) {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;          intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[1], point1));</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;          intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(point1, point2));</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        }</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;      } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (o1 || o2) {</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordflow">if</span> (o1) {</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;          intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[0], point2));</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;          intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[1], point2));</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;      } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(point1, point2));</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;      }</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;    }</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (res == 1) {</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">if</span> (this-&gt;<a class="code" href="classcollision_1_1_collision_object_ex.html#a7fa9738682fe6d4cdef843e99fa5e693">collide</a>(<a class="code" href="classcollision_1_1_point.html">collision::Point</a>(point1),</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                      <a class="code" href="classcollision_1_1_collision_request.html">CollisionRequest</a>(<a class="code" href="namespacecollision.html#a5710326b44abbfb109e65257ee5f310aa8ebb6af9dcffddc56e2de7bad9a3508b">COL_DEFAULT</a>))) {</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;      intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[0], point1));</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;      intersect.push_back(<a class="code" href="classcollision_1_1_line_segment.html">LineSegment</a>(inters1[0], point2));</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    }</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  }</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="comment">// collision::raytrace::raytrace_postprocess(point1, point2, inters1,</span></div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="comment">// intersect, this );</span></div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;}</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#a3a753fc06c7a44f0a1c9321e73ae0045">   96</a></span>&#160;<a class="code" href="classcollision_1_1_sphere.html">Sphere</a> *<a class="code" href="classcollision_1_1_sphere.html#a3a753fc06c7a44f0a1c9321e73ae0045">Sphere::clone</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classcollision_1_1_sphere.html#aea1dad1d98ae974c334b309f08642b32">Sphere</a>(*<span class="keyword">this</span>); }</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#a6cf2771171ffd124fdd50956e6b4e79e">   98</a></span>&#160;<a class="code" href="classcollision_1_1_sphere.html#aea1dad1d98ae974c334b309f08642b32">Sphere::Sphere</a>(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_sphere.html">Sphere</a> &amp;copy) : <a class="code" href="classcollision_1_1_shape.html">Shape</a>(copy) {</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;  <a class="code" href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">center_</a> = copy.<a class="code" href="classcollision_1_1_shape.html#aca9a2f6e0de0822e241e39dad9c419ce">center</a>();</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;  <a class="code" href="classcollision_1_1_shape.html#ab453849fed42ee9769df87210ca5262d">radius_</a> = copy.<a class="code" href="classcollision_1_1_sphere.html#ac773bc522d6d9dacf188ce25330efa31">radius</a>();</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;}</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#acb5bcd4a264388c5add9533b75488977">  103</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_sphere.html#acb5bcd4a264388c5add9533b75488977">Sphere::print</a>(std::ostringstream &amp;stream)<span class="keyword"> const </span>{</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;  stream &lt;&lt; <span class="stringliteral">&quot;Sphere:\n&quot;</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;         &lt;&lt; <span class="stringliteral">&quot;center: (&quot;</span> &lt;&lt; <a class="code" href="classcollision_1_1_shape.html#a690571543f14979499df6fbada671f1f">center_x</a>() &lt;&lt; <span class="stringliteral">&quot;|&quot;</span> &lt;&lt; <a class="code" href="classcollision_1_1_shape.html#aabac3270d60bb5affed693af36fd39d8">center_y</a>() &lt;&lt; <span class="stringliteral">&quot;)\n&quot;</span></div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;         &lt;&lt; <span class="stringliteral">&quot;radius: &quot;</span> &lt;&lt; <a class="code" href="classcollision_1_1_shape.html#ab453849fed42ee9769df87210ca5262d">radius_</a> &lt;&lt; std::endl;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#a51b4c7be7cc4f99ce0f6709af9204204">  109</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classcollision_1_1_sphere.html#a51b4c7be7cc4f99ce0f6709af9204204">Sphere::set_radius</a>(<span class="keywordtype">double</span> _radius) {</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  <a class="code" href="classcollision_1_1_shape.html#ab453849fed42ee9769df87210ca5262d">radius_</a> = _radius;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <a class="code" href="classcollision_1_1_collision_object_ex.html#ab080033cf96284d10d0a7950bf2fd595">invalidateCollisionEntityCache</a>();</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;}</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classcollision_1_1_sphere.html#af5480bed16c4e3899f4b691a36ce60e7">  114</a></span>&#160;<a class="code" href="namespacecollision.html#ad1b9e0627f58ff6e988d3d1f3b3537a3">ShapeType</a> <a class="code" href="classcollision_1_1_sphere.html#af5480bed16c4e3899f4b691a36ce60e7">Sphere::type</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcollision_1_1_sphere.html#ad894cc3dfba54ca4146b917d32fcfa84">type_</a>; }</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="preprocessor">#if ENABLE_SERIALIZER</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">serialize</a> {</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;ICollisionObjectExport *exportObject(<span class="keyword">const</span> <a class="code" href="classcollision_1_1_sphere.html">collision::Sphere</a> &amp;);</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;serialize::ICollisionObjectExport *Sphere::exportThis(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <span class="keywordflow">return</span> serialize::exportObject(*<span class="keyword">this</span>);</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;}</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;} <span class="comment">// namespace collision</span></div><div class="ttc" id="raytrace__primitive_8h_html"><div class="ttname"><a href="raytrace__primitive_8h.html">raytrace_primitive.h</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_ab453849fed42ee9769df87210ca5262d"><div class="ttname"><a href="classcollision_1_1_shape.html#ab453849fed42ee9769df87210ca5262d">collision::Shape::radius_</a></div><div class="ttdeci">double radius_</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00072">shape.h:72</a></div></div>
<div class="ttc" id="point_8h_html"><div class="ttname"><a href="point_8h.html">point.h</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_af5480bed16c4e3899f4b691a36ce60e7"><div class="ttname"><a href="classcollision_1_1_sphere.html#af5480bed16c4e3899f4b691a36ce60e7">collision::Sphere::type</a></div><div class="ttdeci">ShapeType type() const</div><div class="ttdoc">Get shape type.</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00114">sphere.cc:114</a></div></div>
<div class="ttc" id="namespacecollision_1_1raytrace_html_ad60325650aba6f3ce8fd4eb92cad44c1"><div class="ttname"><a href="namespacecollision_1_1raytrace.html#ad60325650aba6f3ce8fd4eb92cad44c1">collision::raytrace::findLineCircleIntersections</a></div><div class="ttdeci">int findLineCircleIntersections(double cx, double cy, double radius, const Eigen::Vector2d &amp;p1, const Eigen::Vector2d &amp;p2, std::vector&lt; Eigen::Vector2d &gt; &amp;inters)</div><div class="ttdef"><b>Definition:</b> <a href="raytrace__primitive_8cc_source.html#l00025">raytrace_primitive.cc:25</a></div></div>
<div class="ttc" id="structcollision_1_1raytrace_1_1_point_html"><div class="ttname"><a href="structcollision_1_1raytrace_1_1_point.html">collision::raytrace::Point</a></div><div class="ttdef"><b>Definition:</b> <a href="raytrace__primitive_8h_source.html#l00021">raytrace_primitive.h:21</a></div></div>
<div class="ttc" id="classfcl_1_1_collision_object_html"><div class="ttname"><a href="classfcl_1_1_collision_object.html">fcl::CollisionObject&lt; FCL_PRECISION &gt;</a></div></div>
<div class="ttc" id="namespacecollision_html_a5710326b44abbfb109e65257ee5f310aa8ebb6af9dcffddc56e2de7bad9a3508b"><div class="ttname"><a href="namespacecollision.html#a5710326b44abbfb109e65257ee5f310aa8ebb6af9dcffddc56e2de7bad9a3508b">collision::COL_DEFAULT</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__requests_8h_source.html#l00006">collision_requests.h:6</a></div></div>
<div class="ttc" id="fcl__transform_8h_html"><div class="ttname"><a href="fcl__transform_8h.html">fcl_transform.h</a></div></div>
<div class="ttc" id="classfcl_1_1_collision_geometry_html"><div class="ttname"><a href="classfcl_1_1_collision_geometry.html">fcl::CollisionGeometry</a></div><div class="ttdef"><b>Definition:</b> <a href="i__fcl__collision__object_8h_source.html#l00010">i_fcl_collision_object.h:10</a></div></div>
<div class="ttc" id="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_transform_html_a9eb07527b07f8c286ed869c9a186b518"><div class="ttname"><a href="classcollision_1_1solvers_1_1solver_f_c_l_1_1_f_c_l_transform.html#a9eb07527b07f8c286ed869c9a186b518">collision::solvers::solverFCL::FCLTransform::fcl_get_3d_translation</a></div><div class="ttdeci">static fcl::Transform3&lt; FCL_PRECISION &gt; fcl_get_3d_translation(const Eigen::Vector2d &amp;pos)</div><div class="ttdef"><b>Definition:</b> <a href="fcl__transform_8h_source.html#l00030">fcl_transform.h:30</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_object_ex_html_ab080033cf96284d10d0a7950bf2fd595"><div class="ttname"><a href="classcollision_1_1_collision_object_ex.html#ab080033cf96284d10d0a7950bf2fd595">collision::CollisionObjectEx::invalidateCollisionEntityCache</a></div><div class="ttdeci">void invalidateCollisionEntityCache(void)</div><div class="ttdef"><b>Definition:</b> <a href="collision__object__ex_8cc_source.html#l00043">collision_object_ex.cc:43</a></div></div>
<div class="ttc" id="namespacecollision_1_1raytrace_html_a025bf0f171abcc1cf7bbee6c4a41bba3"><div class="ttname"><a href="namespacecollision_1_1raytrace.html#a025bf0f171abcc1cf7bbee6c4a41bba3">collision::raytrace::onSegment</a></div><div class="ttdeci">bool onSegment(Point p, Point q, Point r)</div><div class="ttdef"><b>Definition:</b> <a href="raytrace__primitive_8cc_source.html#l00073">raytrace_primitive.cc:73</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="collision__checker_8h_source.html#l00020">collision_checker.h:20</a></div></div>
<div class="ttc" id="sphere_8h_html"><div class="ttname"><a href="sphere_8h.html">sphere.h</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_aea1dad1d98ae974c334b309f08642b32"><div class="ttname"><a href="classcollision_1_1_sphere.html#aea1dad1d98ae974c334b309f08642b32">collision::Sphere::Sphere</a></div><div class="ttdeci">EIGEN_MAKE_ALIGNED_OPERATOR_NEW Sphere(double radius, const Eigen::Vector2d &amp;_center=Eigen::Vector2d(0, 0))</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8h_source.html#l00019">sphere.h:19</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_ab2917f7a9433d4718cb04b9ae87e8b43"><div class="ttname"><a href="classcollision_1_1_sphere.html#ab2917f7a9433d4718cb04b9ae87e8b43">collision::Sphere::createFCLCollisionGeometry</a></div><div class="ttdeci">fcl::CollisionGeometry&lt; FCL_PRECISION &gt; * createFCLCollisionGeometry(void) const override</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00018">sphere.cc:18</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_a917e3ac548dff5f5ffd873845b9e7567"><div class="ttname"><a href="classcollision_1_1_sphere.html#a917e3ac548dff5f5ffd873845b9e7567">collision::Sphere::rayTrace</a></div><div class="ttdeci">bool rayTrace(const Eigen::Vector2d &amp;point1, const Eigen::Vector2d &amp;point2, std::vector&lt; LineSegment &gt; &amp;intersect) const override</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00032">sphere.cc:32</a></div></div>
<div class="ttc" id="fcl__decl_8h_html"><div class="ttname"><a href="fcl__decl_8h.html">fcl_decl.h</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html"><div class="ttname"><a href="classcollision_1_1_sphere.html">collision::Sphere</a></div><div class="ttdoc">Circle.</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8h_source.html#l00014">sphere.h:14</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_request_html"><div class="ttname"><a href="classcollision_1_1_collision_request.html">collision::CollisionRequest</a></div><div class="ttdoc">Universal structure specifying collision request properties.</div><div class="ttdef"><b>Definition:</b> <a href="collision__requests_8h_source.html#l00026">collision_requests.h:26</a></div></div>
<div class="ttc" id="classcollision_1_1_collision_object_ex_html_a7fa9738682fe6d4cdef843e99fa5e693"><div class="ttname"><a href="classcollision_1_1_collision_object_ex.html#a7fa9738682fe6d4cdef843e99fa5e693">collision::CollisionObjectEx::collide</a></div><div class="ttdeci">virtual bool collide(const CollisionObject &amp;c, const collision::CollisionRequest &amp;req=CollisionRequest()) const</div><div class="ttdef"><b>Definition:</b> <a href="collision__object__ex_8cc_source.html#l00013">collision_object_ex.cc:13</a></div></div>
<div class="ttc" id="namespacecollision_html_ad1b9e0627f58ff6e988d3d1f3b3537a3"><div class="ttname"><a href="namespacecollision.html#ad1b9e0627f58ff6e988d3d1f3b3537a3">collision::ShapeType</a></div><div class="ttdeci">ShapeType</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00012">shape.h:12</a></div></div>
<div class="ttc" id="classcollision_1_1_line_segment_html"><div class="ttname"><a href="classcollision_1_1_line_segment.html">collision::LineSegment</a></div><div class="ttdef"><b>Definition:</b> <a href="line__segment_8h_source.html#l00019">line_segment.h:19</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_acb5bcd4a264388c5add9533b75488977"><div class="ttname"><a href="classcollision_1_1_sphere.html#acb5bcd4a264388c5add9533b75488977">collision::Sphere::print</a></div><div class="ttdeci">void print(std::ostringstream &amp;stream) const</div><div class="ttdoc">Print all parameters of the shape.</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00103">sphere.cc:103</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_a51b4c7be7cc4f99ce0f6709af9204204"><div class="ttname"><a href="classcollision_1_1_sphere.html#a51b4c7be7cc4f99ce0f6709af9204204">collision::Sphere::set_radius</a></div><div class="ttdeci">void set_radius(double _radius)</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00109">sphere.cc:109</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html"><div class="ttname"><a href="classcollision_1_1_shape.html">collision::Shape</a></div><div class="ttdoc">Base prototype for the shape of an obstacle.</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00024">shape.h:24</a></div></div>
<div class="ttc" id="namespacecollision_1_1serialize_html_aea63e6d672588912102de4dbfc13ba19"><div class="ttname"><a href="namespacecollision_1_1serialize.html#aea63e6d672588912102de4dbfc13ba19">collision::serialize::serialize</a></div><div class="ttdeci">int serialize(const test::BroadphaseFailureCCObj &amp;bf_object, std::ostream &amp;output_stream, const char *format=SERIALIZER_DEFAULT_FORMAT)</div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_a3a753fc06c7a44f0a1c9321e73ae0045"><div class="ttname"><a href="classcollision_1_1_sphere.html#a3a753fc06c7a44f0a1c9321e73ae0045">collision::Sphere::clone</a></div><div class="ttdeci">Sphere * clone() const</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00096">sphere.cc:96</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_a690571543f14979499df6fbada671f1f"><div class="ttname"><a href="classcollision_1_1_shape.html#a690571543f14979499df6fbada671f1f">collision::Shape::center_x</a></div><div class="ttdeci">double center_x() const</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00018">shape.cc:18</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_aabac3270d60bb5affed693af36fd39d8"><div class="ttname"><a href="classcollision_1_1_shape.html#aabac3270d60bb5affed693af36fd39d8">collision::Shape::center_y</a></div><div class="ttdeci">double center_y() const</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00020">shape.cc:20</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_ac773bc522d6d9dacf188ce25330efa31"><div class="ttname"><a href="classcollision_1_1_sphere.html#ac773bc522d6d9dacf188ce25330efa31">collision::Sphere::radius</a></div><div class="ttdeci">double radius() const</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8h_source.html#l00049">sphere.h:49</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_ad894cc3dfba54ca4146b917d32fcfa84"><div class="ttname"><a href="classcollision_1_1_sphere.html#ad894cc3dfba54ca4146b917d32fcfa84">collision::Sphere::type_</a></div><div class="ttdeci">static constexpr ShapeType type_</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8h_source.html#l00063">sphere.h:63</a></div></div>
<div class="ttc" id="classcollision_1_1_point_html"><div class="ttname"><a href="classcollision_1_1_point.html">collision::Point</a></div><div class="ttdoc">A point in space.</div><div class="ttdef"><b>Definition:</b> <a href="point_8h_source.html#l00018">point.h:18</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_a3a397b619573e160d18954605a11f7bd"><div class="ttname"><a href="classcollision_1_1_shape.html#a3a397b619573e160d18954605a11f7bd">collision::Shape::center_</a></div><div class="ttdeci">Eigen::Vector2d center_</div><div class="ttdef"><b>Definition:</b> <a href="shape_8h_source.html#l00071">shape.h:71</a></div></div>
<div class="ttc" id="classcollision_1_1_sphere_html_a754374f00e6100ea2cfbbd2ee004ff2b"><div class="ttname"><a href="classcollision_1_1_sphere.html#a754374f00e6100ea2cfbbd2ee004ff2b">collision::Sphere::createFCLCollisionObject</a></div><div class="ttdeci">fcl::CollisionObject&lt; FCL_PRECISION &gt; * createFCLCollisionObject(const std::shared_ptr&lt; fcl::CollisionGeometry&lt; FCL_PRECISION &gt;&gt; &amp;) const override</div><div class="ttdef"><b>Definition:</b> <a href="sphere_8cc_source.html#l00023">sphere.cc:23</a></div></div>
<div class="ttc" id="classcollision_1_1_shape_html_aca9a2f6e0de0822e241e39dad9c419ce"><div class="ttname"><a href="classcollision_1_1_shape.html#aca9a2f6e0de0822e241e39dad9c419ce">collision::Shape::center</a></div><div class="ttdeci">Eigen::Vector2d center() const</div><div class="ttdoc">Get geometric center of shape.</div><div class="ttdef"><b>Definition:</b> <a href="shape_8cc_source.html#l00016">shape.cc:16</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
